<template>
    <div class="album-list">
       <el-table :data="albumlist" style="width: 100%" :show-header="false" @row-dblclick="toAlbumDetail">
        <el-table-column type="index" label="序号">
        </el-table-column>
        <el-table-column  width="85">
            <template slot-scope="{row}">
                <img v-lazy="row.picUrl" width="50" height="50"/>
            </template>
        </el-table-column>
        <el-table-column prop="name" width="180"></el-table-column>
        <el-table-column prop="size" >
            <template slot-scope="{row}"  >
                <span>{{row.size}}首</span>
            </template>
        </el-table-column>
        <el-table-column prop="publishTime">
            <template slot-scope="{row}">
                <span>{{row.publishTime | showDate}}</span>
            </template>
        </el-table-column>
        <el-table-column prop="company">
        </el-table-column>
    </el-table>
    </div>
</template>
<script>
import {formatDate} from '@/common/formatDate'
export default {
    name:'',
    props:{
        albumlist: {
			type: Array,
			default() {
				return [];
			},
		},
    },
    data() {
        return {
            
        }
    },
    methods:{
        toAlbumDetail(row){
            this.$router.push("/albumdetail/" + row.id)
        }
    },
    created(){
        
    },
    filters:{
        showDate(value){
            const date = new Date(value);
            return formatDate(date,'yyyy-MM-dd')
        }
    },

}
</script>
<style lang="less" scoped>
    .album-list{
        
    }
</style>